
# 1.
fr = open('mynote3.txt')
s = fr.read()
print(s)
fr.close() # 忘记关闭

# 2. 用 with 语句
with open('mynote3.txt') as fr:
    s = fr.read()
    print(s)